Niniejszy raport przedstawia szczegółową analizę danych eksperymentalnych dotyczących właściwości elektrod grafenowych, mających na celu identyfikację kluczowych czynników wpływających na pojemność właściwą (Capacitance (F/g)).
W wyniku procesu czyszczenia i imputacji danych, zbiór wyjściowy liczący 21 kolumn i 925 został zredukowany do 921 wierszy i 12 kolumn. Największa część brakujących danych (ponad 60%) dotyczyła zmiennych atomowych i linków do publikacji, które zostały usunięte w całości. Pozostałe braki w zmiennych numerycznych zostały skutecznie uzupełnione medianą, a w kategorycznych – wartością “Unknown”.
Model uczenia maszynowego (XGBoost) wykazał, że najbardziej istotnym predyktorem pojemności jest Potential Window (V) oraz Current Density (A/g), wskazał też na duże znaczenie Electrode Configuration.).
Macierz korelacji wskazuje na brak silnej zalezności pomiędzy danymi.
loaded_packages <- .packages()
packages_list <- sort(loaded_packages[loaded_packages != "knitr"])
packages_df <- data.frame(
Biblioteka = packages_list
)
kable(
packages_df,
format = "html"
) %>%
kable_styling(
bootstrap_options = c("striped", "hover", "condensed"),
full_width = FALSE,
font_size = 12
) %>%
column_spec(1, width = "15em")
| Biblioteka |
|---|
| base |
| caret |
| datasets |
| dplyr |
| GGally |
| ggcorrplot |
| ggplot2 |
| graphics |
| grDevices |
| here |
| kableExtra |
| lattice |
| methods |
| plotly |
| scales |
| stats |
| stringr |
| tibble |
| tidyr |
| utils |
| xgboost |
df <- readr::read_csv(here::here("data", "data.csv"))
## Rows: 925 Columns: 21
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): Ref., Limits of Potential Window (V), Electrode Configuration, Ele...
## dbl (16): Lower Limit of Potential Window (V), Upper Limit of Potential Wind...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
set.seed(12345)
options(digits = 4)
session_info <- sessionInfo()
| Braki | Procent | |
|---|---|---|
| Charge Transfer Resistance (Rct) (ohm) | 786 | 84.97 |
| Equivalent Series Resistance (Rs) (ohm) | 772 | 83.46 |
| Pore Size (nm) | 769 | 83.14 |
| Pore Volume (cm^3/g) | 729 | 78.81 |
| O at% | 703 | 76.00 |
| C at% | 699 | 75.57 |
| N at% | 690 | 74.59 |
| Ratio of ID/IG | 596 | 64.43 |
| Specific Surface Area (m^2/g) | 572 | 61.84 |
| Electrolyte Ionic Conductivity | 99 | 10.70 |
| Electrolyte Concentration (M) | 62 | 6.70 |
| Electrolyte Chemical Formula | 22 | 2.38 |
| Capacitance (F/g) | 17 | 1.84 |
| Current Density (A/g) | 16 | 1.73 |
| Cell Configuration (three/two electrode system) | 14 | 1.51 |
| Potential Window (V) | 5 | 0.54 |
| Limits of Potential Window (V) | 4 | 0.43 |
| Lower Limit of Potential Window (V) | 4 | 0.43 |
| Upper Limit of Potential Window (V) | 4 | 0.43 |
| Ref. | 0 | 0.00 |
| Electrode Configuration | 0 | 0.00 |
to_remove <- missing_df %>%
filter(Procent > 60) %>%
pull(Kolumna)
df_clean <- df %>%
select(where(~ mean(is.na(.)) <= 0.60))
missing_per_row <- rowSums(is.na(df_clean))
rows_with_more_than_4 <- sum(missing_per_row > 4)
missing_per_row <- rowSums(is.na(df_clean))
df_clean2 <- df_clean[missing_per_row <= 4, ]
removed_rows <- sum(missing_per_row > 4)
missing_after <- data.frame(
Kolumna = names(df_clean2),
Braki = colSums(is.na(df_clean2)),
Procent = round(colSums(is.na(df_clean2)) / nrow(df_clean2) * 100, 2)
)
missing_after <- missing_after[order(missing_after$Braki), ]
df_final <- df_clean2 %>%
mutate(across(where(is.numeric), ~ ifelse(is.na(.), median(., na.rm = TRUE), .)))
remaining_na <- colSums(is.na(df_final))
df_final <- df_final %>%
mutate(across(where(is.character) | where(is.factor), ~ replace_na(., "Unknown")))
remaining_na_total <- colSums(is.na(df_final))
print(remaining_na_total)
## Ref.
## 0
## Limits of Potential Window (V)
## 0
## Lower Limit of Potential Window (V)
## 0
## Upper Limit of Potential Window (V)
## 0
## Potential Window (V)
## 0
## Current Density (A/g)
## 0
## Capacitance (F/g)
## 0
## Electrode Configuration
## 0
## Electrolyte Chemical Formula
## 0
## Electrolyte Ionic Conductivity
## 0
## Electrolyte Concentration (M)
## 0
## Cell Configuration (three/two electrode system)
## 0
| Zbior | Wiersze | Kolumny |
|---|---|---|
| Przed przetwarzaniem | 925 | 21 |
| Po przetwarzaniu | 921 | 12 |
## Lower Limit of Potential Window (V) Upper Limit of Potential Window (V)
## Min. :-1.100 Min. :-0.20
## 1st Qu.:-0.300 1st Qu.: 0.40
## Median : 0.000 Median : 0.60
## Mean :-0.234 Mean : 0.63
## 3rd Qu.: 0.000 3rd Qu.: 0.80
## Max. : 0.200 Max. : 3.50
## NA's :4 NA's :4
## Potential Window (V) Current Density (A/g) Capacitance (F/g)
## Min. :0.400 Min. : 0.05 Min. : 1.4
## 1st Qu.:0.600 1st Qu.: 1.00 1st Qu.: 148.6
## Median :0.825 Median : 2.00 Median : 260.2
## Mean :0.863 Mean : 5.86 Mean : 415.5
## 3rd Qu.:1.000 3rd Qu.: 5.00 3rd Qu.: 509.9
## Max. :3.500 Max. :200.00 Max. :3344.1
## NA's :5 NA's :16 NA's :17
## Specific Surface Area (m^2/g) Charge Transfer Resistance (Rct) (ohm)
## Min. : 8.9 Min. : 0.08
## 1st Qu.: 57.0 1st Qu.: 0.67
## Median : 160.0 Median : 1.54
## Mean : 417.4 Mean : 3.05
## 3rd Qu.: 546.0 3rd Qu.: 3.24
## Max. :2400.0 Max. :24.20
## NA's :572 NA's :786
## Equivalent Series Resistance (Rs) (ohm) Pore Size (nm) Pore Volume (cm^3/g)
## Min. : 0.20 Min. : 0.53 Min. :0.020
## 1st Qu.: 0.35 1st Qu.: 3.04 1st Qu.:0.168
## Median : 0.58 Median : 4.34 Median :0.217
## Mean : 1.60 Mean : 8.62 Mean :0.486
## 3rd Qu.: 2.00 3rd Qu.:13.62 3rd Qu.:0.507
## Max. :17.50 Max. :44.13 Max. :2.350
## NA's :772 NA's :769 NA's :729
## Ratio of ID/IG N at% C at% O at%
## Min. :0.12 Min. : 0.0 Min. : 1.4 Min. : 1.90
## 1st Qu.:0.94 1st Qu.: 0.0 1st Qu.:37.3 1st Qu.: 8.88
## Median :1.05 Median : 0.0 Median :81.0 Median :13.70
## Mean :1.12 Mean : 2.5 Mean :66.5 Mean :19.18
## 3rd Qu.:1.17 3rd Qu.: 3.2 3rd Qu.:85.6 3rd Qu.:27.10
## Max. :2.90 Max. :23.8 Max. :98.1 Max. :54.28
## NA's :596 NA's :690 NA's :699 NA's :703
## Electrolyte Ionic Conductivity Electrolyte Concentration (M)
## Min. :1.00 Min. :0.10
## 1st Qu.:6.00 1st Qu.:1.00
## Median :6.00 Median :1.00
## Mean :5.81 Mean :2.58
## 3rd Qu.:7.00 3rd Qu.:6.00
## Max. :8.00 Max. :6.00
## NA's :99 NA's :62
## Lower Limit of Potential Window (V) Upper Limit of Potential Window (V)
## Min. :-1.100 Min. :-0.200
## 1st Qu.:-0.300 1st Qu.: 0.400
## Median : 0.000 Median : 0.600
## Mean :-0.233 Mean : 0.629
## 3rd Qu.: 0.000 3rd Qu.: 0.800
## Max. : 0.200 Max. : 3.500
## Potential Window (V) Current Density (A/g) Capacitance (F/g)
## Min. :0.400 Min. : 0.05 Min. : 1.4
## 1st Qu.:0.600 1st Qu.: 1.00 1st Qu.: 150.7
## Median :0.800 Median : 2.00 Median : 260.2
## Mean :0.862 Mean : 5.81 Mean : 413.3
## 3rd Qu.:1.000 3rd Qu.: 5.00 3rd Qu.: 494.8
## Max. :3.500 Max. :200.00 Max. :3344.1
## Electrolyte Ionic Conductivity Electrolyte Concentration (M)
## Min. :1.00 Min. :0.10
## 1st Qu.:6.00 1st Qu.:1.00
## Median :6.00 Median :1.00
## Mean :5.82 Mean :2.48
## 3rd Qu.:7.00 3rd Qu.:6.00
## Max. :8.00 Max. :6.00